"""
 Flash OS Routines (Automagically Generated)
 Copyright (c) 2017-2017 ARM Limited
"""

flash_algo = {
    'load_address' : 0x20000000,
    'instructions' : [
        0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
        0x8F4FF3BF, 0x02004770, 0x283F0D00, 0x0980D302, 0x47701D00, 0x477008C0, 0x49474848, 0x49486041,
        0x21006041, 0x68C16001, 0x431122F0, 0x694060C1, 0xD4060680, 0x49434844, 0x21066001, 0x49436041,
        0x20006081, 0x483D4770, 0x05426901, 0x61014311, 0x47702000, 0x4839B510, 0x24046901, 0x61014321,
        0x03A26901, 0x61014311, 0x4A374939, 0x6011E000, 0x03DB68C3, 0x6901D4FB, 0x610143A1, 0xBD102000,
        0x213FB530, 0x18400549, 0xFFBDF7FF, 0x68CA492B, 0x431A23F0, 0x240260CA, 0x690A610C, 0x0E0006C0,
        0x610A4302, 0x03E26908, 0x61084310, 0x4A264828, 0x6010E000, 0x03ED68CD, 0x6908D4FB, 0x610843A0,
        0x060068C8, 0xD0030F00, 0x431868C8, 0x200160C8, 0xB5F0BD30, 0x1CC94D19, 0x68EB0889, 0x27F00089,
        0x60EB433B, 0x612B2300, 0xE0204C19, 0x4E19692B, 0x612B4333, 0x055B233F, 0x681618C3, 0xF3BF601E,
        0x4B118F4F, 0x601CE000, 0x03F668EE, 0x692BD4FB, 0x005B085B, 0x68EB612B, 0x0F1B061B, 0x68E8D004,
        0x60E84338, 0xBDF02001, 0x1F091D00, 0x29001D12, 0x2000D1DC, 0x0000BDF0, 0x45670123, 0x40023C00,
        0xCDEF89AB, 0x00005555, 0x40003000, 0x00000FFF, 0x0000AAAA, 0x00000201, 0x00000000
    ],

    'pc_Init'            : 0x20000039,
    'pc_UnInit'          : 0x20000067,
    'pc_EraseSector'     : 0x200000A1,
    'pc_ProgramPage'     : 0x200000F3,
    'pc_Verify'          : 0x12000001F,
    'pc_EraseChip'       : 0x20000075,
    'pc_BlankCheck'      : 0x12000001F,
    'pc_Read'            : 0x12000001F,
    
    'static_base'        : 0x20000400,
    'begin_data'         : 0x20000800,
    'begin_stack'        : 0x20000C00,

    'analyzer_supported' : False,

    # Relative region addresses and sizes
    'ro_start'           : 0x00000000,
    'ro_size'            : 0x00000158,
    'rw_start'           : 0x00000158,
    'rw_size'            : 0x00000004,
    'zi_start'           : 0x0000015C,
    'zi_size'            : 0x00000000,

    # Flash information
    'flash_start'        : 0x00200000,
    'flash_size'         : 0x00200000,
    'flash_page_size'    : 0x00000200,
}
